package cn.rocky.pandacodegen.controller;

import cn.rocky.pandacodegen.common.R;
import cn.rocky.pandacodegen.domain.entity.DatasourceConfig;
import cn.rocky.pandacodegen.domain.entity.TableInfo;
import cn.rocky.pandacodegen.service.TableInfoService;
import lombok.RequiredArgsConstructor;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * 数据库表配置信息
 *
 * @author Rocky
 * @date 2023/06/26
 */
@RestController
@RequestMapping("table-info")
@RequiredArgsConstructor
public class TableInfoController extends BaseController {

    private final TableInfoService tableInfoService;

    @RequestMapping("/list")
    public R list() {
        return new R().ok(tableInfoService.listAll());
    }
}
